package com.sky.web;

import com.sky.service.PmsSkuInfoService;
import com.sky.vo.sku.SkuInfoAddVo;
import com.sky.vo.sku.SkuInfoVo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class SkuInfoController {

    @Resource
    private PmsSkuInfoService pmsSkuInfoService;

    @GetMapping("/skuInfo")
    public String skuInfo(@RequestParam("skuId")Long skuId, Model model) {
        SkuInfoVo skuInfoVo = pmsSkuInfoService.getSkuDetails(skuId);
        model.addAttribute("skuInfo", skuInfoVo);
        return "item";
    }
}
